﻿using NLog;

namespace CCLog;
public class LoggerService : ILoggerService
{
    private Logger _logger;
    public LoggerService()
    {
        LogManager.LoadConfiguration("nlog.config");
        _logger = LogManager.GetLogger("");
    }

    public void Info(string title, string msg)
    {
        _logger.Info($"{title} : {msg}");
    }

    public void Warn(string title, string msg)
    {
        _logger.Warn($"{title} : {msg}");
    }

    public void Error(string title, string msg)
    {
        _logger.Error($"{title} : {msg}");
    }

    public void Error(string title, Exception ex)
    {
        _logger.Error($"{title} : {ex.StackTrace}, {ex.Message}");
    }

    public void SystemError(Exception ex)
    {
        throw new NotImplementedException();
    }
}
